#ifndef OLED_H
#define OLED_H

#include "Arduino.h"

#define OLED_SCL_H digitalWrite(26,HIGH)
#define OLED_SCL_L digitalWrite(26,LOW)
#define OLED_SDA_H digitalWrite(25,HIGH)
#define OLED_SDA_L digitalWrite(25,LOW)

#define OLED_Addr 0x78

#define OLED_CMD  0
#define OLED_DATA 1

#define Up      0
#define Down    1

#define Normal 0
#define Inv 1

#define OLED_ON     OLED_DisPlay_ON()
#define OLED_OFF    OLED_DisPlay_OFF()

void OLED_Init(void);
void OLED_IIC_Start(void);
void OLED_IIC_Stop(void);
void OLED_IIC_WaitAck(void);
void OLED_Send_Byte(unsigned char data);
void OLED_Write_Cmd_Data(unsigned char data,unsigned char mode);
void OLED_DisPlay_ON(void);
void OLED_DisPlay_OFF(void);
void OLED_Refresh(void);
void OLED_Clear(void);
void OLED_ColorInv(unsigned char i);
void OLED_Display_UpDown(unsigned char i);
void OLED_DrawPoint(unsigned char x,unsigned char y,unsigned char t);
void OLED_DrawLine(unsigned char x1,unsigned char y1,unsigned char x2,unsigned char y2,unsigned char mode);
void OLED_DrawCircle(unsigned char x,unsigned char y,unsigned char r);
void OLED_ShowChar(unsigned char x,unsigned char y,unsigned char chr,unsigned char size1,unsigned char mode);
void OLED_ShowChar6x8(unsigned char x,unsigned char y,unsigned char chr,unsigned char mode);
void OLED_ShowString(unsigned char x,unsigned char y,unsigned char *chr,unsigned char size1,unsigned char mode);
void OLED_ShowNum(unsigned char x,unsigned char y,long num,unsigned char len,unsigned char size1,unsigned char mode);
void OLED_ShowChinese(unsigned char x,unsigned char y,unsigned char num,unsigned char size1,unsigned char mode);
void OLED_ScrollDisplay(unsigned char num,unsigned char space,unsigned char mode);
void OLED_ShowPicture(unsigned char x,unsigned char y,unsigned char sizex,unsigned char sizey,unsigned char BMP[],unsigned char mode);

#endif
